import React from "react";


import {

    View,
    Text,
    Button, StyleSheet,

} from 'react-native';







export default class ChatPage extends React.Component{


    static navigationOptions={


        tabBarLabel: '聊天页面',

        headerTitleStyle: {
            alignSelf:'center'
        }

    };

    render(){


        // const { navigate } = this.props.navigation;

        return  (

            <View style={styles.container}>

                <Text>

                    聊天页面
                </Text>


                <Person name="张三"/>


            </View>

        )


    }


}

class Person extends React.Component {
    render() {
        return (
            <Text style={styles.text_red}>
                欢迎{this.props.name}来到聊天页面 </Text>
        );
    }
}


const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    icon:{
        width:20,
        height:20
    },

    text_red:{

        color:'red',

        fontSize:30,
        fontWeight:'bold',//normal

    }
});